package com.fishleap.controller;

import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;

import java.util.Calendar;

/**
 * @author zlg
 * @create 2020-05-22 23:14
 */
@Controller
public class LoginController {

    @RequestMapping(value = "/toLogin",method = RequestMethod.GET)
    public String toLogin(Model model) {
        model.addAttribute("currentYear", Calendar.getInstance().get(Calendar.YEAR));
        return "../login";
    }

    @RequestMapping("/")
    public String index(){
        return "redirect:/article/list/1/3";
    }
}
